package com.dome.service;

import com.dome.config.MyDateSources;
import com.dome.dao.ResourceDao;
import com.dome.dao.RoleDao;
import com.dome.model.Resource;
import com.dome.model.Role;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class ResourceService {
	@Autowired
	ResourceDao resourceDao;
	@MyDateSources(data="1")
	public void deleteResourceWH(long id) {
		resourceDao.deleteResourceWH(id);
	}
	@MyDateSources(data="1")
	public List<Resource> getWH(long id) {
		return resourceDao.selectResource(id);
	}
	@MyDateSources(data="2")
	public List<Resource> getBJ(long id) {
		return resourceDao.selectResource(id);
	}
	@MyDateSources(data="1")
	public void insertResourceWH(List<Resource> resoueceBJ) {
		  resourceDao.insertResourceWH(resoueceBJ);
	}
}
